console.log('--------------------------------');
let person = new Object();
person.name = 'Nicholas';
console.log(person.name);
let student = {
    name:'Nicholas',
    age:29,
    5:'female'
}
console.log(JSON.stringify(student));
// console.log(student.5);
console.log(student['5']);//female

function displayInfo(obj){
    let output = '';
    if(typeof obj.name === 'string'){
        output = `Name:${obj.name}\n`;
    }
    if(typeof obj.age === 'number'){
        output = `Age:${obj.age}\n`;
    }
    console.log(output);
}
displayInfo({name:'Nichol'});//Name:Nichol
displayInfo({age:45});//Age:45

let obj = {
    name:'Smith',
    'a  ge':45,
    5:'5555'
}
let param = 'name';
console.log(obj[param]);
console.log(obj['a  ge']);
console.log(obj['5']);